-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add zsh completion #1136
Add zsh completion #1136
Conversation
assets/completions/bat.zsh
Outdated
@@ -0,0 +1,56 @@ | |||
#compdef bat | |||
# FIXME: help me with the subcommand `cache`, zsh completion is hard as hell |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have never written any completion scripts. Let's leave this open until someone can help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'll dive into the zsh manual again later, sorry to say but is one of the most difficult manual I have read IMO 🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be also okay with merging this without support for the cache
subcommand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added the completion of cache
subcommand in 32905f7
Thank you very much for your contribution! |
Thank you very much for the updates. We should also make sure that the zsh completions is properly included in the tarballs and the Debian packages (see similar code for fish completions). Also, could you please add an entry to the "unreleased" section in
where |
@sharkdp is the change suppose to be done in .github/workflows/CICD.yml? I don't have any experience in packaging and deploying as well as github action. After some searching I think the zsh completion script should be copy to |
05bd691
to
55c01d6
Compare
sorry and please ignore the 05bd691 commit up there, I messed up with some history stuff. I did a few changes. Tell me if I did something wrong. |
Thank you for the updates. As you can see in the failed tests, the packaging stage currently fails with:
|
Thanks for the reply, I hope the things go without problem now. |
Thank you for the updates! |
I tried copying the generated file to |
zsh do the searches in the As of my installation of zsh from manjaro's repository, which is derivative of arch linux's, But what I found from https://github.com/zsh-users/zsh/blob/04bd9a44a74683ad0d83921bfb3aa0c4d5992c75/INSTALL#L254-L262 :
(that is really a mess...) After all, if the release is a deb package, according to this answer, I believe we should just change the |
Hm, weird. I actually tested on Arch Linux. I can't get the completions working by putting
👍 That's what we do for |
Just now I had a chance to finally try out the zsh completions myself. They are absolutely fantastic!! Thank you very much for putting so much work into this. |
also... they have been relased in v0.16.0. |
@Kienyew This is very neat! Perhaps I've missed it, but it wasn't obvious to me that the completion file had to be renamed to |
I agree with you, it really needs some efforts to search up something about this kind of stuff.
How about we just tag one of the maintiner and discuss with them? |
Sounds good. @sharkdp Your thoughts? Would it make sense to add a "Shell completion" section to the README or would a README in |
I think we could add such a section to the README, yes 👍 But before that, shouldn't we simply change the name of the file to |
Thanks for confirming - if no-one beats me to it I'll try and submit a PR later today. I think the confusing part is that |
sounds good! |
No description provided.